<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@attribute name="mentors" required="true" type="java.util.List" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="${language}"/>
<fmt:bundle basename="messages" prefix="mentorlist.">
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th><fmt:message key="name"/></th>
                <th><fmt:message key="surname"/></th>
                <th><fmt:message key="email"/></th>
                <th><fmt:message key="birthdate"/></th>
                <th><fmt:message key="gender"/></th>
                <th><fmt:message key="info"/></th>
                <th><fmt:message key="rang"/></th>
                <th><fmt:message key="workexp"/></th>
                <th><fmt:message key="status"/></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${mentors}" var="mentor">
                <tr>
                    <td>${mentor.name}</td>
                    <td>${mentor.surname}</td>
                    <td>${mentor.email}</td>
                    <td>${mentor.birthdate}</td>
                    <td>${mentor.gender}</td>
                    <td>${mentor.info}</td>
                    <td>${mentor.rang}</td>
                    <td>${mentor.workExperience}</td>
                    <td>

                        <fmt:message key="deleted.${mentor.deleted}"/>

                    </td>

                    <td>
                        <form action="/maa/do" method="post"><input type="hidden" name="action"
                                                                    value="mentor-update-page"/>
                            <input type="hidden" name="uuid" value=${mentor.uuid}/>
                            <input class="btn btn-default mybtn" type="submit" value="<fmt:message key="update"/>"/>
                        </form>
                    </td>
                    <td>
                        <form action="/maa/do" method="post"><input type="hidden" name="action" value="remove-mentor"/>
                            <input type="hidden" name="uuid" value=${mentor.uuid}/>
                            <input class="btn btn-default mybtn" type="submit" value="<fmt:message key="remove"/>"/>
                        </form>
                    </td>
                    <td>
                        <form action="/maa/do" method="post"><input type="hidden" name="action" value="restore-mentor"/>
                            <input type="hidden" name="uuid" value=${mentor.uuid}/>
                            <input class="btn btn-default mybtn" type="submit" value="<fmt:message key="restore"/>"/>
                        </form>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</fmt:bundle>